package com.lantosec.hmrp.modules.monitor.controller;


import com.lantosec.hmrp.core.kit.Result;
import com.lantosec.hmrp.core.mvc.BaseController;
import com.lantosec.hmrp.modules.monitor.entity.AssetsInfoEntity;
import com.lantosec.hmrp.modules.monitor.service.IMonitorAssetsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *
 * 患者满意度 控制器
 *
 * @author AutoCode
 * @since 2020-05-27
 */
@Api(value = "大屏固定资产控制器", tags = "大屏固定资产控制器")
@RestController
@RequestMapping("/monitor/assets")
@Log4j2
public class MonitorAssetsController extends BaseController {
    @Autowired
    private IMonitorAssetsService service;

    @GetMapping("getAssetsTotalAmount")
    @ApiOperation(value = "固定资产总金额")
    public Result<AssetsInfoEntity> getAssetsTotalAmount() {
        AssetsInfoEntity total = service.getAssetsTotalAmount();
        return Result.ok(total);
    }

    @GetMapping("getAssetsTypeAmount")
    @ApiOperation(value = "固定资产分类总金额")
    public Result<List<AssetsInfoEntity>> getAssetsTypeAmount() {
        List<AssetsInfoEntity> total = service.getAssetsTypeAmount();
        return Result.ok(total);
    }
}
